﻿/*
 Copyright aswing.org, see the LICENCE.txt.
*/
 

import YouHP.Graphics.Brush;

/**
 * 
 * @author iiley
 */
class YouHP.Graphics.SolidBrush implements Brush{
	private var color:Number;
	private var alpha:Number;
	
	/**
	 * <p>
	 * SolidBrush(color:ASColor)<br>
	 * SolidBrush(color:Number, alpha:Number)<br>
	 */
	function SolidBrush(color:Number, alpha:Number){
	    this.color = color;
	    this.alpha = alpha;
	}
	
	public function getColor():Number{
		return color;
	}
	
	public function setColor(color:Number):Void{		
		if(color!=null){
			this.color=color;
		}		
	}
	
	public function setAlpha(alpha:Number):Void{
			if(alpha!=null){
				this.alpha=alpha;
			}
	}
	
	public function getAlpha():Number{
		return alpha;
	}
	
	public function beginFill(target:MovieClip):Void{
		target.beginFill(color,alpha);
	}
	
	public function endFill(target:MovieClip):Void{
		target.endFill();
	}
	
}
